import service from '@/utils/request'

//127.0.0.1:19090/system/teacher/login
export function loginService(userAccount, password) {
    return service({
        url: "/teacher/login",
        method: "post",
        data: { userAccount, password }
    })
}

//127.0.0.1:19090/system/teacher/info
export function getUserInfoService() {
    return service({
        url: "/teacher/info",
        method: "get",
    });
}

//127.0.0.1:19090/system/teacher/logout
export function logoutService() {
    return service({
        url: "/teacher/logout",
        method: "delete",
    });
}

//127.0.0.1:19090/system/teacher/list
export function getTeacherListService(params) {
    return service({
        url: "/teacher/list",
        method: "get",
        params
    });
}

export function getTeacherDetailService(teacherId) {
    return service({
        url: "/teacher/detail",
        method: "get",
        params: { teacherId },
    });
}

export function addTeacherService(params = {}) {
    return service({
        url: "/teacher/add",
        method: "post",
        data: params,
    });
}

export function delTeacherService(teacherId) {
    return service({
        url: "/teacher/delete",
        method: "delete",
        params: { teacherId },
    });
}

export function editTeacherService(params = {}) {
    return service({
        url: "/teacher/edit",
        method: "put",
        data: params,
    });
}
export function getTeacherSelectListService() {
    return service({
        url: "/teacher/selectList",
        method: "get",
    });
}